use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq)]
#[serde(rename_all = "UPPERCASE")]
pub enum RobotType {
    #[default]
    API,
    RRAI,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct RobotEntity {
    pub id: u32,
    pub user_id: String,
    pub nickname: String,
    pub avatar: String,
    pub rtype: RobotType,
    pub url: String,
    pub token_key: String,
    pub token_value: String,
    pub options: String,
    pub request_jmespath: String,
    pub response_jmespath: String,
    pub allow_sharing: u16,
    pub peer_id: String,
    pub ability: String,
    pub created_at: u32,
    pub updated_at: u32,
    pub status: u16,
}

#[derive(Debug, Deserialize, Serialize)]
pub struct QueryByIdResponse<T> {
    data: T,
}
